import { notification } from 'antd';
import React from "react";
import { SmileOutlined, FrownOutlined } from '@ant-design/icons';

export const show = (title, content, type) => {
  switch (type) {
    case 'success':
      notification.open({
        message: title,
        description: content,
        icon: <SmileOutlined style={{ color: '#108ee9' }} />,
      });
      break;
    case 'error':
      notification.open({
        message: title,
        description: content,
        icon: <FrownOutlined style={{ color: '#e93b10' }} />,
      });
      break;
    case 'info':
      notification.info({
        message: title,
        description: content,
      });
      break;
    case 'warn':
      notification.warning({
        message: title,
        description: content,
      });
      break;

    default:
      break;
  }

}
